import Vue from 'vue'
import vuex from 'vuex'
Vue.use(vuex);
const localStorage = window.localStorage;
export default new vuex.Store({
    state:{
        circle:localStorage.getItem('circle'),
    },
    getters:{
    	getcircleInfo:(state)=>state.circle==null?'':state.circle
    },
    mutations:{
    	setcircleInfo(state,circle){
    		state.circle = circle;
    		localStorage.setItem('circle',circle)
    	},
//   	add(state){
//      state.cid = 0;
//	    },
//	    newAuthor(state,msg){
//	    	state.cid = msg;
//	    }
	  },
	  actions:{
	  	setcircleInfo({commit},user){
	  		commit('setcircleInfo',user)
	  	}
	  }
})